package from;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;

import java.util.ArrayList;
import java.util.List;

public class DropDownChoicePage extends WebPage {
    private static List SITES = new ArrayList();
    static {
        SITES.add("http://aa.com");
        SITES.add("http://bb.com");
        SITES.add("http://cc.com");
    }

    public DropDownChoicePage(){
        super();

        Form form = new Form("formDrop");
        this.add(form);

        DropDownChoice siteChoice = new DropDownChoice("sites",SITES);
        form.add(siteChoice);

        siteChoice.setRequired(true);
        siteChoice.setNullValid(true);
    }
}
